Data processing systems today are becoming more complex and may use distributed or parallel processing with multiple processors to increase processing efficiency and speed. A multiprocessor data processing system may include several bus master devices that share a common resource, such as a bus or a memory. An arbitration system is used to control access to, for example, the bus by the bus master devices to prevent simultaneous access to the bus. A multiprocessor system having a common bus needs a mechanism for prioritizing bus arbitration between the processors. There are several known techniques for prioritizing and arbitrating a shared bus access with several processors.
One known technique for prioritizing and arbitrating a shared bus access is to assign a static set of fixed priority values to each processor based on a relative average through-put that has been computed for each of the processors. This may be based on frequency and/or time periods each of the processors needs access to the bus.
Another known technique for prioritizing and arbitrating a shared bus is to generate processor priority based on a system of timers. Each processor maintains a timer which is an indication of the time since the last time the processor had access to the bus. In the case where two processors make a simultaneous request for the bus, the processor with the largest time since its last access is granted access.
In a real-time processing environment, such as in a multimedia communications system requiring, for example, compression and decompression of data, the above mechanisms for bus arbitration do not result in a system of high enough performance, or possibly even an operable system, because failure to obtain access at a critical time could result in loss of media, e.g., segment of sound. None of the prior art mechanisms can actually track the varying real-time needs of algorithms running on the processors. Therefore, a method is needed for bus arbitration in a real-time processing system that allows for more efficient shared resource usage.
Also, a multi-processor system that processes irregular, real-time tasks can be made to operate more efficiently if the tasks can be switched on each processor.
One known technique to control task switching is to assign a static set of fixed priority values to each task. The fixed priority values are based on relative average throughput requirements, frequency and/or time periods of need. Another known technique for task switching is to assign a running timer to each task. Each timer is reset to zero each time program control switches to its task. When a current task is complete, the task having the highest timer value has priority. Both of these techniques work if the requirements for balancing resource needs between the tasks are relatively relaxed.
In prior art multi-processor systems that have task switching, semaphores are used to pass processing control from one processor to another by writing and reading the semaphores in specific memory locations in a common shared semaphore buffer. To pass processing control in this manner requires repeated accesses to the semaphore buffer by both the upstream and downstream processors each time a data flow decision is needed.
In a real-time processing environment, such as in a multimedia communications system requiring, for example, compression and decompression of data, the above techniques for task switching do not result in a system of high enough performance when a resource, such as a bus or a memory is shared. Also, the frequent accessing of semaphore registers in the shared memory uses excessive bandwidth in communications systems that transmit packets of data in a burst mode. None of the prior art techniques can actually track the varying real-time needs of algorithms running on the processors. Therefore, a method is needed for task switching in a real-time processing system that allows for more efficient shared resource usage.